"----------------------------" println
#运算符重载？
OperatorTable slotNames println
OperatorTable assignOperators asJson
OperatorTable addOperator("xor", 11)
true xor := method(bool,if(bool,false,true)) 
false xor := method(bool,if(bool,true,false)) 
a := true xor true 
a println
true xor false println
false xor true println
false xor false println
"----------------------------" println
#DSL的关键们: 
#call doMessage forward resend super 激活的槽
Call println #Call stores slots related to activation.
#Car driver := method(call) 
#Evaluates the message object in the context of the receiver. Returns the result. optionalContext can be used to specific the locals context in which the message is evaluated.

myif := method(
    (call sender doMessage(call message argAt(0))) ifTrue( 
    call sender doMessage(call message argAt(1))) ifFalse( 
    call sender doMessage(call message argAt(2)))
)
myif := method(
    call evalArgAt(0) ifTrue(
    call evalArgAt(1)) ifFalse( 
    call evalArgAt(2))
)
myif("foo" == "
bar", write("true\n"), write("false\n"))
getSlot("myif") code

MyObject := Object clone
MyObject forward := method(
    write("sender = ", call sender, "\n")
    write("message name = ", call message name, "\n")
    args := call message argsEvaluatedIn(call sender)
    args foreach(i, v, write("arg", i, " = ", v, "\n") )
)
"----------------------------2" println
# 2/0 返回0 操作符只是简化的消息
Object originchu := Number getSlot("/")
Number / := method(i,if(i==0,0,originchu(i)))
2/0 println
#File
aFile := File open("C:\\Users\\tzp\\Projects\\7-lan\\IoTest\\test2.io")
"----------------------------" println
